// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
const apiPrefix = '/web';

/** 新建mqtt权限 POST /mqtt/acl/add */
export async function mqttAclControllerSave(
  body: API.MqttAclDTO,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultVoid>(`${apiPrefix}/mqtt/acl/add`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除mqtt权限 DELETE /mqtt/acl/del */
export async function mqttAclControllerDelete(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.mqttAclControllerDeleteParams,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultVoid>(`${apiPrefix}/mqtt/acl/del`, {
    method: 'DELETE',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 修改mqtt权限信息 PUT /mqtt/acl/edit */
export async function mqttAclControllerEdit(
  body: API.MqttAclDTO,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultString>(`${apiPrefix}/mqtt/acl/edit`, {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
